-- GENERATED SPELL FOR [Slim's Friend] --


function spell0_4971(pUnit, Event) --@Backstab,n/a--
pUnit:FullCastSpellOnTarget(2589,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4971', 639, 1)
end

function spell1_4971(pUnit, Event) --@Poison,n/a--
pUnit:FullCastSpellOnTarget(744,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4971', 30000, 1)
end

function Sorts_4971(pUnit, Event)
local choix_sorts_4971 = math.random(0, 1)
if choix_sorts_4971 == 0 then
pUnit:RegisterEvent('spell0_4971', 1, 1)
end
if choix_sorts_4971 == 1 then
pUnit:RegisterEvent('spell1_4971', 1, 1)
end
end

function mob4971_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_4971', math.random(1500, 3000), 1)
end

function mob4971_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4971_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4971_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(4971, 1, 'mob4971_Action')
RegisterUnitEvent(4971, 2, 'mob4971_Leave')
RegisterUnitEvent(4971, 3, 'mob4971_Kill')
RegisterUnitEvent(4971, 4, 'mob4971_Die')
